#docker rmi -f happylay/elastichd:1.4.1
docker pull happylay/elastichd:1.4.1
rm -rf /cardone/docker/images/happylay/elastichd_1.4.1.tar
mkdir -p /cardone/docker/images/happylay
docker save happylay/elastichd:1.4.1 > /cardone/docker/images/happylay/elastichd_1.4.1.tar
#docker load < /cardone/docker/images/happylay/elastichd_1.4.1.tar


docker node update --label-rm cardone-elastichd_elastichd cardone-01-01
docker node update --label-add cardone-elastichd_elastichd=true cardone-01-01

docker stack rm cardone-elastichd

docker stack deploy -c /cardone/middlewares/elastichd/prod.yml cardone-elastichd

for i in {1..10}  
do  
sleep $i

docker stack ps cardone-elastichd

docker service ls
done

docker service logs cardone-elastichd_elastichd -f --tail 300
